import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/page/index'
import Content from '@/page/content'
import Login from '@/page/login'
import Overview from '@/page/overview'
import productManage from '@/page/product/productManage'
import userAnalysis from '@/page/user/userAnalysis'
import userManage from '@/page/user/userManage'
import commentManage from '@/page/wechat/commentManage'
import leaveWordsManage from '@/page/wechat/leaveWordsManage'
import menuManage from '@/page/wechat/menuManage'
import messageManage from '@/page/wechat/messageManage'
Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/index',
      name: 'Index',
      component: Index,
      children: [
        {
          path: '/overview',
          name: 'Overview',
          component: Overview
        },
        {
          path: '/wechat/commentManage',
          name: '评论管理',
          component: commentManage
        },
        {
          path: '/wechat/leaveWordsManage',
          name: '留言管理',
          component: leaveWordsManage
        },
        {
          path: '/wechat/menuManage',
          name: '菜单管理',
          component: menuManage
        },
        {
          path: '/wechat/messageManage',
          name: '消息管理',
          component: messageManage
        },
        {
          path: '/user/userManage',
          name: '用户管理',
          component: userManage
        },
        {
          path: '/user/userAnalysis',
          name: '用户分析',
          component: userAnalysis
        },
        {
          path: '/user/productManage',
          name: '菜品管理',
          component: productManage
        }
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/content/:id',
      name: 'Content',
      component: Content
    }
  ]
})
